/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.panomedic;

import com.panomedic.utils.Utils;
import com.panomedic.colors.ColorConstants;
import java.util.prefs.Preferences;

/**
 *
 * @author Yare
 */
public class Constants {
    
    
    // Preferences String constants
    
    public final static String defNodePath = "/com/panomedic";
    public final static String FRAME_X = "frame_x";
    public final static String FRAME_Y = "frame_y";
    public final static String FRAME_WIDTH = "frame_width";
    public final static String FRAME_HEIGHT = "frame_height";
    public final static String SPLIT_WIDTH = "split_width";
    
    // options
    
    public static final String CS_TYPE = "cs_type";
    public static final String COMP_PROC = "comp_proc";
    public static final String METHOD_CHOICE = "method_choice";
    public static final String LUT_ACCURACY = "lut_accuracy";
    public static final String BLUR_RADIUS = "blur_radius";
    
    public static final String SAVE_END = "save_end";
    
    
    public static final String SMOOTHING = "smoothing";
    public static final String MONOTON = "monoton";
    
    
    
    public final static String APPLICATION_NAME = "Panomedic";
    public final static String APPLICATION_VERSION_NUMBER = "0.9.0";
    
    public static final int METHOD_LUT = 0;
    public static final int METHOD_STRETCHING = 1;
    
    /**
     * Returns number of components which is being processed (i.e. 
     * @return
     */
    public static int getNumCompProc(){
        Preferences prefs = Preferences.userRoot().node(Constants.defNodePath);
        int count = 0;
        for (int i = 0; i < ColorConstants.NUM_COMP; i++) {
            if (Utils.getCompProc(prefs.getInt(Constants.COMP_PROC, 0))[i])
                count++;
        }
        return count;
    }
    
    
     /* ********************************************************************** */
    /* LOG4J FILES ********************************************************** */
    /* ********************************************************************** */
    
    /**
     * File containing log4j properties
     */
    public static final String LOG_PROPERTIES_FILE = "log4j.properties";
    
    /**
     * File containing extended log filters properties
     */
    public static final String LOG_FILTERS_FILE = "log4jfilter.properties";
    
    /**
     * File containing application log
     */
    public static final String LOG_OUTPUT_FILE = "panomedic.log";
    
    
}
